
/**
 * 
 */
package com.xxxx.game;

/**
 * @author HuXiaolong
 *
 */
public class DelayAnimation extends AnimationBasic
{
	private int mDelayTimes = 0;

	public DelayAnimation(int delay_times)
	{
		mDelayTimes = delay_times;
	}
	
	public int getLeftTime()
	{
		return mDelayTimes;
	}
	
	public void resetLeftTime(int delay_times)
	{
		mDelayTimes = delay_times;
	}

	@Override
	public boolean update(ISprite sprite)
	{
		if (mDelayTimes <= 0) 
			return false;
		return mDelayTimes -- > 0;
	}

	public boolean isMoving()
	{
		return false;
	}

	@Override
	public String getName()
	{
		// TODO Auto-generated method stub
		return "Delay";
	}
}
